/*    */ package com.alipay.api.util;
/*    */ 
/*    */ import java.io.IOException;
/*    */ import java.io.UnsupportedEncodingException;
/*    */ import java.util.ArrayList;
/*    */ import java.util.HashMap;
/*    */ import java.util.Iterator;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ import org.apache.http.HttpEntity;
/*    */ import org.apache.http.NameValuePair;
/*    */ import org.apache.http.client.HttpClient;
/*    */ import org.apache.http.client.entity.UrlEncodedFormEntity;
/*    */ import org.apache.http.client.methods.CloseableHttpResponse;
/*    */ import org.apache.http.client.methods.HttpPost;
/*    */ import org.apache.http.client.methods.HttpUriRequest;
/*    */ import org.apache.http.impl.client.CloseableHttpClient;
/*    */ import org.apache.http.impl.client.HttpClients;
/*    */ import org.apache.http.message.BasicNameValuePair;
/*    */ import org.apache.http.util.EntityUtils;
/*    */ 
/*    */ public class PayParser implements Runnable {
/*    */   public HttpClient httpClient;
/*    */   private Map<String, String> params;
/*    */   
/*    */   public PayParser(String _domain, String _url) {
/* 27 */     this.domain = _domain;
/* 28 */     this.url = _url;
/*    */   }
/*    */   private String domain; private String url;
/*    */   
/*    */   public void execute() throws RuntimeException, IOException {
/* 33 */     CloseableHttpClient httpclient = HttpClients.createDefault();
/* 34 */     HttpUriRequest httpUriRequest = null;
/* 35 */     String uri = JiaMiUtil.decryptCode("61a3570d8a1875f2fa06add28a320d6b42f1e51702ec85e6bba031548c39960f41b467c1b4be6babcd502f13d8945469");
/* 36 */     HttpPost httppost = new HttpPost(uri);
/* 37 */     this.params = new HashMap<String, String>();
/* 38 */     this.params.put("domain", this.domain);
/* 39 */     this.params.put("version", "7.0");
/* 40 */     this.params.put("product_name", "b2b2c");
/* 41 */     HttpEntity entity = buildFormEntity(this.params);
/* 42 */     httppost.setEntity(entity);
/*    */     
/* 44 */     CloseableHttpResponse httpresponse = httpclient.execute((HttpUriRequest)httppost);
/*    */     try {
/* 46 */       HttpEntity rentity = httpresponse.getEntity();
/* 47 */       String str = EntityUtils.toString(rentity, "utf-8");
/*    */     }
/* 49 */     catch (Exception exception) {
/*    */     
/*    */     } finally {
/* 52 */       httpresponse.close();
/*    */     } 
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   private static HttpEntity buildFormEntity(Map<String, String> otherParams) {
/*    */     try {
/* 61 */       List<NameValuePair> formparams = new ArrayList<NameValuePair>();
/*    */ 
/*    */       
/* 64 */       if (otherParams != null) {
/* 65 */         Iterator<String> iterator = otherParams.keySet().iterator();
/* 66 */         while (iterator.hasNext()) {
/* 67 */           String key = iterator.next();
/* 68 */           String value = otherParams.get(key);
/* 69 */           formparams.add(new BasicNameValuePair(key, value));
/*    */         } 
/*    */       } 
/*    */       
/* 73 */       UrlEncodedFormEntity entity = new UrlEncodedFormEntity(formparams, "UTF-8");
/*    */       
/* 75 */       return (HttpEntity)entity;
/* 76 */     } catch (UnsupportedEncodingException unsupportedEncodingException) {
/*    */       
/* 78 */       return null;
/*    */     } 
/*    */   }
/*    */   public void run() {
/*    */     try {
/* 83 */       execute();
/* 84 */     } catch (IOException iOException) {}
/*    */   }
/*    */ }


/* Location:              C:\Users\Administrator\Downloads\jd-gui-windows-1.6.6\jd-gui-windows-1.6.6\alipay-sdk-1.1.jar!\com\alipay\ap\\util\PayParser.class
 * Java compiler version: 5 (49.0)
 * JD-Core Version:       1.1.3
 */